﻿@using Seal.Model;
@using System.Drawing;
@using System.Globalization;
@{
    ReportViewTemplate Template = Model;

    //Template Name
    Template.Name = ReportViewTemplate.ModelCSVExcelName;

    //If for model, the Model parameter object used for the parsing is the Model instead of the Report
    Template.ForModel = true;

    //This specify to open the view in a dedicated file having the extension
    Template.ExternalViewerExtension = "csv";

    //Do not attach images when using this template
    Template.SkipFileAttachments = true;

    //Parameters for this template
    Template.Parameters.Add(new Parameter() { Name = "csv_separator", Value = CultureInfo.CurrentCulture.TextInfo.ListSeparator, DisplayName = "CSV Separator", Description = "The separator used to generate the CSV file" });
    Template.Parameters.Add(new Parameter() { Name = "use_display_format", DisplayName = "Use display format", BoolValue = true, Description = "If true, the display format is applied to the values displayed in the CSV file" });
    
    //Allowed template parent names
    Template.ParentNames = new List<string>() { "Report" };
}
